/*
 * 系统项目名称：综合决策分析系统-version2.0
 * 文件名：AnaImportDataDaoImpl.java
 * 描述：
 * 版权：Copyright 2015-2020 义乌市跨境电商供应链管理有限公司-版权所有
 * 修改人：yangjx
 * 修改时间：2016-3-17 上午9:13:25
 * 版本号：V1.1
 */
package com.ywt.cda.dao.impl;

import com.ywt.cda.core.dao.page.Page;
import com.ywt.cda.dao.AnaExportDataDao;
import com.ywt.cda.domain.Ana2ndData;
import com.ywt.cda.domain.AnaExportData;
import com.ywt.cda.domain.AnaImportData;
import org.apache.commons.collections.map.HashedMap;
import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * （一句话功能简述） <br>
 * （功能详细描述）
 * 
 * @author lougf
 * @version V1.0
 * @see [相关类/方法]
 * @since 2016-3-17 上午9:13:25
 */
@Repository("anaExportDataDao")
public class AnaExportDataDaoImpl implements AnaExportDataDao {
	@Resource(name = "sqlSession")
	private SqlSession sqlSession;


	@Override
	public Long getAllExportCountrySumNum(Map<String, Object> params) {
		Long sumNum = sqlSession.selectOne("AnaExportData.allCountrySumNum", params);
		return null == sumNum?0l:sumNum;
	}


	@Override
	public List<AnaExportData> listTotalDataByParamsAndGoods(Map<String, Object> params) {
		return sqlSession.selectList("AnaExportData.total3rdByParams", params);
	}

	@Override
	public List<Map<String, Object>> goodsCategoriesMList(Map<String, Object> params) {
		return sqlSession.selectList("AnaExportData.goodsCategoriesMList", params);
	}

	@Override
	public List<Map<String, Integer>> goodsCategoriesByCountryMList(Map<String, Object> params) {
		return sqlSession.selectList("AnaExportData.goodsCategoriesByCountryMList", params);
	}

	@Override
	public List<Map<String, Object>> getTopCountryList(Map<String, Object> params) {
		return sqlSession.selectList("AnaExportData.getTopCountryList", params);
	}

	@Override
	public List<Map<String, Integer>> getTopCountryCategoriesList(Map<String, Object> params) {
		return sqlSession.selectList("AnaExportData.getTopCountryCategoriesList", params);
	}

	@Override
	public List<String> getTopCategoryList(Map<String, Object> params) {
		return sqlSession.selectList("AnaExportData.getTopCategoryList", params);
	}

	@Override
	public List<Map<String,Object>> getCountryByCategoriesList(Map<String, Object> params) {
		return sqlSession.selectList("AnaExportData.getCountryByCategoriesList", params);
	}

	@Override
	public List<Integer> getSumCategoryNum(Map<String, Object> params) {
		return sqlSession.selectList("AnaExportData.getSumCategoryNum", params);
	}

	@Override
	public List<Map<String, Object>> getGoodRangeData(Map<String, Object> params) {
		return sqlSession.selectList("AnaExportData.getGoodRangeData", params);
	}

	@Override
	public List<Map<String, Object>> getCategoryMonthData(Map<String, Object> params) {
		return sqlSession.selectList("AnaExportData.getCategoryMonthData", params);
	}

	@Override
	public Integer getYesterdayCount(Map<String, Object> params) {
		return sqlSession.selectOne("Ana1stData.getYesterdayCount", params);
	}

	@Override
	public Integer getThisMonthCount(Map<String, Object> params) {
		return sqlSession.selectOne("Ana1stData.getThisMonthCount", params);
	}

	@Override
	public Integer getThisYearCount(Map<String, Object> params) {
		return sqlSession.selectOne("Ana1stData.getThisYearCount", params);
	}

	@Override
	public List<Map<String, Object>> getTopCountryNameList(Map<String, Object> params) {
		return sqlSession.selectList("AnaExportData.getTopCountryNameList", params);
	}

	@Override
	public Integer getAllCountrySum() {
		Map<String, Object> params = new HashedMap();
		return sqlSession.selectOne("AnaExportData.getAllCountrySum", params);
	}

	@Override
	public Map<String, Object> getSumSalesCount() {
		Map<String, Object> params = new HashedMap();
		return sqlSession.selectOne("AnaExportData.getSumSalesCount", params);
	}

	@Override
	public Map<String, Object> getDHSumSalesCount() {
		Map<String, Object> params = new HashedMap();
		return sqlSession.selectOne("AnaExportData.getDHSumSalesCount", params);
	}

	@Override
	public List<Map<String, Object>> getTopCategorySumList(Map<String, Object> params) {
		return sqlSession.selectList("AnaExportData.getTopCategorySumList", params);
	}

	@Override
	public Integer getCoustomerNum() {
		Map<String, Object> params = new HashedMap();
		return sqlSession.selectOne("Ana1stData.getCoustomerNum", params);
	}

	@Override
	public List<Map<String, Object>> getAllCountryCategory(Map<String, Object> params) {
		return sqlSession.selectList("AnaExportData.getAllCountryCategory", params);
	}

	@Override
	public List<Map<String, String>> getContinentTop10(String continent) {
		return sqlSession.selectList("AnaExportData.getContinentTop10", continent);
	}


}
